from django.db import models


class PlainPage(models.Model):
    FORMATS = [(x, x) for x in ['restructuredtext', 'html']]

    title = models.CharField(max_length=31)
    slug = models.SlugField(unique=True)
    content = models.TextField()
    format = models.CharField(max_length=31, choices=FORMATS)

    def __unicode__(self):
        return "'%s' in %s" % (self.title, self.format)

